﻿<UserControl xmlns:telerik="http://schemas.telerik.com/2008/xaml/presentation"  xmlns:sdk="http://schemas.microsoft.com/winfx/2006/xaml/presentation/sdk"  x:Class="DotNetNuke.Silverlight.agPageAdmin.Views.PagesView"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:core="clr-namespace:Telerik.Windows.Controls;assembly=Telerik.Windows.Controls"
    xmlns:helper="clr-namespace:DotNetNuke.Silverlight.agPageAdmin.Helpers"
    mc:Ignorable="d"
    d:DesignHeight="300" d:DesignWidth="400">

    <UserControl.Resources>
        <!--<helper:HierarchyConverter x:Key="HierarchyConverter" />
        <telerik:HierarchicalDataTemplate x:Name="ItemTemplate" 
            ItemsSource="{Binding Converter={StaticResource HierarchyConverter}}">
            <StackPanel Orientation="Horizontal">
                <TextBlock Text="{Binding TabName}" />
            </StackPanel>
        </telerik:HierarchicalDataTemplate>-->
    </UserControl.Resources>

    <Canvas>
        <telerik:RadTreeView   
            x:Name="pageTree"
            HorizontalAlignment="Left"
            Margin="10" 
            VerticalAlignment="Top"
            IsLineEnabled="True"
            IsRootLinesEnabled="True" 
            ItemsSource="{Binding Pages}">
            <telerik:RadTreeView.ItemTemplate>
                <telerik:HierarchicalDataTemplate ItemsSource="{Binding ChildNodes}">
                    <StackPanel Orientation="Horizontal" DataContext="{Binding Entity}">
                        <Image Source="{Binding VisibleImage}" Margin="0 0 10 0"/>
                        <TextBlock Text="{Binding TabName}" />
                    </StackPanel>
                </telerik:HierarchicalDataTemplate>
            </telerik:RadTreeView.ItemTemplate>
        </telerik:RadTreeView>
    </Canvas>
</UserControl>
